﻿


@echo off

set exepath=%~dp0

for /f "tokens=*" %%i in ('findstr "<ServiceName>.*</ServiceName>" %exepath%ServiceSetting.xml')do set "s=%%i"

for /f "delims=<" %%j in ("%s:*<ServiceName>=%")do set "ServiceName=%%j"

echo --------------------The service name is :%ServiceName%--------------------------

C:\Windows\Microsoft.NET\Framework\v4.0.30319\InstallUtil.exe %exepath%HpSocketIotGateway.exe

C:\Windows\System32\net.exe start %ServiceName%

pause